package com.qk.mapper;

import com.qk.entity.Role;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RoleMapper {

    List<Role> selectListRoles(@Param("name") String name, @Param("label") String label);

    @Delete("delete from role where id = #{id}")
    void deleteRoleById(Long id);

    @Insert("insert into role(name, label, remark, create_time, update_time) values (#{name},#{label},#{remark},#{createTime},#{updateTime})")
    void insertRole(Role role);

    @Select("select * from role where id = #{id}")
    Role selectRoleById(Long id);

    void updateRoleById(Role role);
}
